# -*- coding: utf-8 -*-

from odoo import models, fields, api

class StockPickingType(models.Model):
    _inherit = 'stock.picking.type'

    return_type = fields.Selection([
                                    ('picking', u'生产领料'),
                                    ('repicking', u'生产补料'),
                                    ('return_raw', u'生产退料'),
                                    ('stock_scrap', u'生产报废'),
                                    ])

class StockPicking(models.Model):
    _order = 'scheduled_date desc'
    _inherit = 'stock.picking'




    raw_pick_production_id = fields.Many2one('mrp.production',string=u'领料的MO单', index=True)
    scarp_production_id=fields.Many2one('mrp.production',string=u'报废的MO',index=True)
    return_raw_production_id=fields.Many2one('mrp.production',string=u'退料的MO',index=True)
    scarp_production_id = fields.Many2one('mrp.production', string=u'报废的MO', index=True)
